﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PersonUploadFile_BK.aspx.cs" Inherits="RN.ERP.Web.Person.PersonUploadFile" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>文件上传</title>
    <link href="../Styles/skins/blue/css/style.css" rel="stylesheet" type="text/css" />
    <link rel="Stylesheet" type="text/css" href="../Scripts/ligerUI/skins/Aqua/css/ligerui-all.css" />
    <script src="../Scripts/jquery.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="../Scripts/ligerUI/js/ligerui.min.js"></script>
</head>
<body>
    <form id="form1" runat="server" enctype="multipart/form-data" method="post">  
    <input id="hdfilename" type="hidden" value="" runat="server"/>  
    <input id="hdSysCode" type="hidden" value="EF" runat="server"/>  
    <input id="hdFuncCode" type="hidden" value="Person" runat="server"/>  
    <script type="text/javascript">
        var filename = $("#<%= hdfilename.ClientID%>").val();
        var syscode = $("#<%= hdSysCode.ClientID%>").val();
        var funccode = $("#<%= hdFuncCode.ClientID%>").val();
        var upload_file = "<%= uploadimg.ClientID%>";
        function OpenAlert(text) {
            $.ligerDialog.warn(text);
            return false;
        }
        //上传返回事件
        function returnToParent(result) {
            var oArg = new Object();
            oArg.childWinName = syscode;
            oArg.funcCode = funccode;
            oArg.Result = result;
            parent.window.OnClientCloseImg(oArg); //调用页面必须包含方法OnClientCloseImg
            window.parent.$.ligerDialog.close(); ////关闭dialog
            parent.$(".l-dialog,.l-window-mask").hide(); ////去除父窗体遮罩层
        }
        /* 上传文件 */
        function uploadFile() {
          
            if (!$("#" + upload_file).val()) {
                OpenAlert("请选择图片！");
                return false;
            }
            var upload_file_file = $("#" + upload_file).val()
            var ext = upload_file_file.substring(upload_file_file.lastIndexOf("."));
            if (ext.toLowerCase().indexOf(".jpg") < 0) {
                OpenAlert("请选择.jpg图片！");
                return false;
            }
        }
    </script>
    <div id="con">
        <ul id="tags">
            <li class="selectTag"><a href="javascript:void(0)">文件上传</a> </li>
        </ul>
        <div id="tagContent">
            <table width="400" border="0" cellspacing="0" cellpadding="0" class="xx_tab">
                <tr>
                    <td>
                        选择上传文件
                    </td>
                    <td>
                        <div class="p_input00">
                            <span class="input_l">
                                <img src="../images/input_l.jpg" width="10" height="31" alt="" /></span> <span class="p_liulan00">
                                    <asp:FileUpload ID="uploadimg" runat="server" Style="width: 255px; height: 31px;
                                        line-height: 31px; border: 0; background: transparent" />
                                </span><span style="float: left"></span>
                        </div>
                    </td>
                </tr>
                <tr>
                <td>
                </td>
                <td align="center">
                 <div class="ckicon">
                     <asp:LinkButton ID="lbtnUpload" runat="server" 
                         OnClientClick="return uploadFile();" onclick="lbtnUpload_Click">上传</asp:LinkButton>
                                               </div>
                </td></tr>
            </table>
        </div>
    </div>
     <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadAjaxLoadingPanel runat="server" ID="LoadingPanel">
        </telerik:RadAjaxLoadingPanel>
        <telerik:RadWindowManager ID="Manager1" runat="server" EnableShadow="true" Skin="WebBlue">
         <Windows>
                <telerik:RadWindow ID="UserDialog" runat="server" Title="" Height="720px" Behaviors="Move,Close"
                    Width="820px" Left="150px" ReloadOnShow="true" ShowContentDuringLoad="false"
                    Modal="true" Skin="WebBlue" VisibleStatusbar="False" >
                </telerik:RadWindow>
            
            </Windows>
        </telerik:RadWindowManager>
    </form>
</body>
</html>
